• <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>
            asm, c, c++ are my all
            -- Core In Computer
            posts - 139,  comments - 123,  trackbacks - 0

            ********************************************\
            |????歡迎轉載, 但請保留作者姓名和原文鏈接, 祝您進步并共勉!???? |
            \********************************************/


            C++對象模型(10) - 3.2 Data Member Layout

            作者: Jerry Cat
            時間: 2006/11/15
            鏈接:?
            http://www.shnenglu.com/jerysun0818/archive/2006/11/15/15192.html


            3.2 Data Member Layout

            class Point3d {
            public:
            ?? // ...
            private:
            ?? float x;
            ?? static List<Point3d*> *freeList;
            ?? float y;
            ?? static const int chunkSize = 250;
            ?? float z;
            };
            the nonstatic data members are set down in the order of their declaration(按聲明的順序) within each class object (any intervening static data members, such as freeList and chunkSize, are ignored). In our example, then, each Point3d object consists of three float members in order: x, y, z. The static data members are stored in the program's data segment independent of individual class objects.

            The Standard requires within an access section (the private, public, or protected section of a class declaration) only that the members be set down such that "later members have higher addresses within a class object" (Section 9.2 of the Standard). That is, the members are not required to be set down contiguously.(可以不連續但必須從低到高)

            What might intervene between the declared members? Alignment constraints on the type of a succeeding member may require padding. This is true both of C and C++, and in this case, the member layout of the two languages is in current practice the same.(對齊)

            虛表指針在哪兒? Traditionally, it has been placed after all the explicitly declared members of the class. More recently, it has been placed at the beginning of the class object. The Standard, by phrasing the layout requirement as it does, allows the compiler the freedom to insert these internally generated members anywhere, even between those explicitly declared by the programmer.

            In practice, multiple access sections are concatenated together into one contiguous block in the order of declaration.編譯器幫你同類項合并 No overhead is incurred by the access section specifier or the number of access levels. For example, declaring eight members in one access section or eight separate access sections in practice results in the same-sized objects.

            posted on 2006-11-15 23:34 Jerry Cat 閱讀(976) 評論(0)  編輯 收藏 引用

            <2009年8月>
            2627282930311
            2345678
            9101112131415
            16171819202122
            23242526272829
            303112345

            常用鏈接

            留言簿(7)

            隨筆檔案

            最新隨筆

            搜索

            •  

            最新評論

            閱讀排行榜

            評論排行榜

            精品久久一区二区三区| 亚洲综合熟女久久久30p| 国产免费久久精品丫丫| 久久久黄片| 人妻无码中文久久久久专区| 久久亚洲精品视频| 99久久夜色精品国产网站 | 国产精品永久久久久久久久久| 久久久久久久尹人综合网亚洲| 色婷婷噜噜久久国产精品12p| 无码AV波多野结衣久久| 91精品国产色综久久| 久久久久高潮综合影院| 久久精品女人天堂AV麻| 中文字幕热久久久久久久| 日本久久久久久中文字幕| 少妇久久久久久久久久| 久久久这里只有精品加勒比| 88久久精品无码一区二区毛片 | 亚洲欧美国产精品专区久久| 久久精品无码专区免费青青| 久久99久久无码毛片一区二区| 亚洲国产欧美国产综合久久| 色综合久久精品中文字幕首页| 久久亚洲AV成人无码国产| 狠狠精品久久久无码中文字幕 | 亚洲色欲久久久综合网东京热| 国产精品久久久久一区二区三区| 91精品国产乱码久久久久久| 国产精品久久久香蕉| 精品国产婷婷久久久| 久久国产精品成人免费| 99久久人妻无码精品系列| 伊人久久大香线蕉亚洲五月天| 亚洲国产精品无码久久一区二区| 亚洲伊人久久成综合人影院| 狠狠色噜噜狠狠狠狠狠色综合久久| 狠狠色丁香久久婷婷综| 久久99热只有频精品8| 久久精品夜夜夜夜夜久久| 久久永久免费人妻精品下载|